#include "../Basics/BasicStruct.cpp"

#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))

List CreateListByArray(int* number,int length) {
    List list = (ListNode*)malloc(sizeof(ListNode));

    List head = list;
    for (int i = 0; i < length; ++i) {
        ListNode* node = (ListNode*)malloc(sizeof(ListNode));
        node->data = number[i];
        node->next = NULL;

        list->next = node;
        list = node;
    }

    return head->next;
}